package com.color.admin.system.entity.vo.menu;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.ArrayList;
import java.util.List;

/**
 * @author HaiQiu
 * @date 2022/1/14
 * 前端菜单路由
 */
public class RouterVo {
    @JsonIgnore
    String id;
    @JsonIgnore
    String parentId;
    /**
     * 路由在游览器地址栏里的hash值，也就是说这个路由要用什么URL地址来访问。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    String path;
    /**
     * 路由的标识，必填且与页面组件的name一致，否则 <keep-alive> 页面缓存效果失效。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    String name;
    //加载的页面组件位置，系统将自动组装成 () => import(/* webpackChunkName: "home" */ '@/views/home') 的形式。
    @JsonInclude(JsonInclude.Include.NON_NULL)
    String component;
    /**
     * 重定向地址。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    String redirect;
    /**
     * 元数据，见下方。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    MetaVo meta;
    /**
     * 子集路由。
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    List<RouterVo> children = new ArrayList<>();

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getRedirect() {
        return redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }

    public MetaVo getMeta() {
        return meta;
    }

    public void setMeta(MetaVo meta) {
        this.meta = meta;
    }

    public List<RouterVo> getChildren() {
        return children;
    }

    public void setChildren(List<RouterVo> children) {
        this.children = children;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
}
